<div class="row">
    <div class="col-lg-12">       
         <h3 class="page-header">Danh sách trả lời thông báo của khách hàng</h3>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default"> 
            <div class="panel-body">               
                     <div class="table-reponsive">
                         <a class="" href="<?php echo $this->url(array("action"=>"address1")) ?>">  <p> <button type="reset" class="btn btn-default" id ="answer">Danh sách tin từ cửa hàng gửi tới</button></a></br></p>
                    <form name="add_question" id="add_question" action="<?php echo $this->url(array("action"=>"messger")) ?>">
                        <table name="list_question" id="list_question" class="table table-hover">
                            <tr class="success">
                                <th>Tiêu đề thông báo</th><th>Nội dung câu thông báo</th><th>Người trả lời</th><th>Nội dung trả lời</th>
                              </tr>
                              <?php 
                                 foreach($this->data as $item){                                   
                                     if($item->getQuestion()==""){
                                         $tinhtrang="Chưa trả lời";
                                     }  else { 
                                         $tinhtrang=$item->getQuestion();
                                     }
                                      if($item->getUser_Id()==0){
                                         $user="Tất cả";
                                     }  else { 
                                         $user=GlobalLib::getName("user", $item->getUser_Id(), "username");
                                     }
                                      if(substr($item->getTitle(),0,1)=="T"){ 
                                   echo " <tr>
                        
                                        <td class=\"t\">".substr($item->getTitle(),1)."</td>
                                        <td class=\"t\">".$item->getAnswer()."</td>    
                                         <td class=\"u\">".$user."</td>
                                        <td class=\"q\" >".$tinhtrang."</td>
                                        </tr><script type=\"text/javascript\">
                                            $(\"#abc".$item->getId()."\").focusin(function(){
                                                 $(\"#list_selectQuestion\").val($(\"#list_selectQuestion\").val()+".$item->getId()."+\",\");
                                           });</script>";}
                                 }
                               ?>
                        </table>
                        <input type ="hidden" name="list_selectQuestion" id="list_selectQuestion" value="" ></br>                      
                                <?php 
                                   // echo $this->paginationControl($this->data, 'Sliding' , 'feedback/pagination.phtml'); 
                                    ?>
                            </div></br>
                        <div class="form-group"><center>
                               <button type="submit" class="btn btn-default"id="submit">OK</button>
                               </center>
                        </div>
                    </form>    
                </div>
               
            </div>
        </div>
    </div>
</div>    
<script type="text/javascript">
    // $(#list_xem).multiselect(); 
</script>
